/*
 * @Author: yanzengyong 709402944@qq.com
 * @Date: 2025-08-15 16:50:32
 * @LastEditors: yanzengyong 709402944@qq.com
 * @LastEditTime: 2025-08-20 12:00:49
 * @FilePath: /cyj-boot-parent/cyj-boot-web/src/api/demo/pure-table.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import { defHttp } from '/@/utils/http/axios';

import { BasicPageParams, BasicResult } from '/@/api/model/baseModel';

enum Api {
  DEMO_LIST = 'http://localhost:3100/mock/table-pure/list',
  DEMO_LIST_ONLINE = '/mock/api/project',
}

interface DemoListItem {
  id: string;
  dictName: string;
  dictCode: string;
  description: string;
  createTime: string;
  updateTime: string;
}

type DemoListGetResultModel = BasicResult<DemoListItem>;

interface TableParams extends BasicPageParams {
  dictName?: string;
  dictCode?: string;
}

export const demoListApi = (params: TableParams) => 
  defHttp.get<DemoListGetResultModel>({
    url: Api.DEMO_LIST,
    params,
    headers: {
      ignoreCancelToken: true,
    },
  });

  /**
 * 字典列表接口
 * @param params
 */
export const list = (params) => defHttp.get({ url: '/sys/dict/list', params });

  /**
 * 项目列表接口
 * @param params
 */
export const listOnline = (params) => defHttp.get({ url: Api.DEMO_LIST_ONLINE, params });
  
